<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<style type="text/css">
		
		div{
			float: left ;
			margin-left: 20px;
		}
	</style>
	
	<body>
		<input type="button" value="将DIV变成红色" onclick="bianse()"/><br />
		<div  style="width: 100px; height: 100px; background-color: black;"></div>
		<div  style="width: 100px; height: 100px; background-color: black;"></div>
		<div  style="width: 100px; height: 100px; background-color: black;"></div>
	</body>
</html>
<script src="../js/jquery-3.1.1.min.js"></script>
<script>
	function bianse(){
		$("div").css("background-color","red")
	}
</script>